<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
	<style type="text/css">
		body, html,#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;font-family:"微软雅黑";}
    </style>
    <script type="text/javascript" src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=OGvra4LQfISKnfSV8zfbfiRBXvtKFGm4"></script>
    <script type="text/javascript" src="//api.map.baidu.com/library/LuShu/gl/src/LuShu_min.js"></script>
	<title>大地线路书</title>
</head>
<body>
	<div id="allmap"></div>
</body>
</html>
<script type="text/javascript">
	// 百度地图API功能
	var map = new BMapGL.Map("allmap");
	var point = new BMapGL.Point(116.297611, 40.047363);
	map.centerAndZoom(point, 17);
	map.enableScrollWheelZoom();
    function startLushu() {
        var fly = '';
        lushu = new BMapGLLib.LuShu(map, polyline.getPath(), {
            geodesic: true,
            autoCenter: true,
            icon: new BMapGL.Icon(fly, new BMapGL.Size(48, 48), { anchor: new BMapGL.Size(24, 24) }),
            speed: 150,
            enableRotation: true
        });
        setTimeout('lushu.start()', 4000);
    }
    var path = [
        new BMapGL.Point(116.297611,40.047363),
        new BMapGL.Point(116.302839,40.048219),
        new BMapGL.Point(116.308301,40.050566),
        new BMapGL.Point(116.305732,40.054957),
        new BMapGL.Point(116.304754,40.057953),
        new BMapGL.Point(116.306487,40.058312),
        new BMapGL.Point(116.307223,40.056379),
    ];
    var polyline = new BMapGL.Polyline(path, {
        clip: true,
        geodesic: true,
        strokeColor:"red",
        strokeWeight: 3,
        strokeStyle:"dashed"
    });
    map.addOverlay(polyline);
    startLushu();
</script>